package com.yami.shop.api.controller;

import cn.hutool.json.JSONObject;
import com.yami.shop.common.response.ServerResponseEntity;
import com.yami.shop.service.VersionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/version/")
public class VersionController {

    @Autowired
    private VersionService versionService;

    @GetMapping("ua/getVersion/{type}")
    public ServerResponseEntity<JSONObject> getVersion(@PathVariable("type") String type){
        return ServerResponseEntity.success(versionService.getVersion(type));
    }
}
